#!/bin/bash


deletefile()
{
  rm /var/www/myweb/html -rf
  rm /var/www/myweb/html.tar.gz -rf
  echo "File delete done.."
}

cpfile(){
  mkdir /var/www/myweb/html/skis/templates/include -p
  mkdir /var/www/myweb/html/ueditor/php/upload/ -p
  cp /var/www/myweb/ueditor/php/upload/* /var/www/myweb/html/ueditor/php/upload/ 
  cp /var/www/myweb/skis/templates/include/* /var/www/myweb/html/skis/templates/include/
  chmod 777 /var/www/myweb/html -R
  tar -czvf html.tar.gz ./html
}

case "$1" in
        delete)
                deletefile
                ;;
        copy)
                cpfile
                ;;
	      *)
		echo "web.server [start|status|stop]"
		;;
esac
